################################################################################ # (C) Copyright IBM Corp. 1994, 1995, 1996, 1998 # All rights reserved. # U.S. GOVERNMENT USERS RESTRICTED RIGHTS - # USE, DUPLICATION OR DISCLOSURE RESTRICTED BY # GSA ADP SCHEDULE CONTRACT WITH IBM CORP. # Licensed Materials-Property of IBM. # # Script Name: addtraps.9729 # # Purpose: Add trap definitions for the traps from the 9729 agent. # These definitions are used for the display and logging of # traps by Netview for AIX. # # When to use: Run this script once at installation time or after any # reinstallation of Netview for AIX (which wipes out the trapd.conf # file). It may take a few minutes to run. Be patient! # # Contents: This script is a series of addtrap commands. They all have # the same format: # # addtrap -n enterpriseName # -l trapLabel # -i enterpriseOID # -g generic trap number # -s specific trap number # -o source id (A = from SNMP agent) # -S severity(0=cleared, 1=Indeterminate, 2=warning, # 3=Minor, 4=Critical, 5=Major) # -t status type(0=Defaults, 1=Unknown, 2=Up, 3=Marginal, # 4=Down, 5=Unmanaged, 6=Acknowledge, # 7=User1, 8=User2) # -c category # -F format (format shown in event cards/list & in log) # -D Description of trap. # # Dependencies: Netview for AIX must be installed and running. # # For more details: See the Netview for AIX Programmer's Reference. # ###################################################################### ctr=1 echo "\nAdding 9729 traps ..." echo "\n" ################### Power Supply 1 Down Trap ######################### /usr/OV/bin/addtrap -n "ibm9729" \ -l "ibm9729PowerSupply1DownTrap" \ -i '1.3.6.1.4.1.2.6.86' \ -g 6 \ -s 1 \ -o A \ -S 2 \ -t 0 \ -T \ -c "Status Events" \ -F 'IBM 9729 Power Supply 1 Down \n$*'\ -D 'This trap is issued if power supply 1 fails.' echo "Trap ibm9729PowerSupply1DownTrap has been added." ctr=$((( $ctr + 1 ))) echo "\n" ################### Power Supply 2 Down Trap ######################### /usr/OV/bin/addtrap -n "ibm9729" \ -l "ibm9729PowerSupply2DownTrap" \ -i '1.3.6.1.4.1.2.6.86' \ -g 6 \ -s 2 \ -o A \ -S 2 \ -t 0 \ -T \ -c "Status Events" \ -F 'IBM 9729 Power Supply 2 Down \n$*'\ -D 'This trap is issued if power supply 2 fails.' echo "Trap ibm9729PowerSupply2DownTrap has been added." ctr=$((( $ctr + 1 ))) echo "\n" ################### Grating Control System Error Trap ################ /usr/OV/bin/addtrap -n "ibm9729" \ -l "ibm9729GratingControlSystemErrorTrap" \ -i '1.3.6.1.4.1.2.6.86' \ -g 6 \ -s 3 \ -o A \ -S 2 \ -t 0 \ -T \ -c "Status Events" \ -F 'IBM 9729 Grating Control System Error \n$*'\ -D 'This trap is issued if the grating control system fails.' echo "Trap ibm9729GratingControlSystemErrorTrap has been added." ctr=$((( $ctr + 1 ))) echo "\n" ################### Cabinet Temperature Out of Range Trap ############## /usr/OV/bin/addtrap -n "ibm9729" \ -l "ibm9729CabinetTemperatureOutofRangeTrap" \ -i '1.3.6.1.4.1.2.6.86' \ -g 6 \ -s 4 \ -o A \ -S 2 \ -t 0 \ -T \ -c "Status Events" \ -F 'IBM 9729 Cabinet Temperature Out of Range \n$*'\ -D 'This trap is issued if the cabinet temperature is not within its permissible range.' echo "Trap ibm9729CabinetTemperatureOutofRangeTrap has been added." ctr=$((( $ctr + 1 ))) echo "\n" ################### Unit Not Responding to Poll Trap #################### /usr/OV/bin/addtrap -n "ibm9729" \ -l "ibm9729UnitNotRespondingtoPollTrap" \ -i '1.3.6.1.4.1.2.6.86' \ -g 6 \ -s 5 \ -o A \ -S 1 \ -t 0 \ -T \ -c "Status Events" \ -F 'IBM 9729 Unit Not Responding to Poll \n$*'\ -D 'This trap is issued if the 9729 stops responding to polls from the SNMP subagent.' echo "Trap ibm9729UnitNotRespondingtoPollTrap has been added." ctr=$((( $ctr + 1 ))) echo "\n" ################### Link Down Trap ###################################### /usr/OV/bin/addtrap -n "ibm9729" \ -l "ibm9729LinkDownTrap" \ -i '1.3.6.1.4.1.2.6.86' \ -g 6 \ -s 6 \ -o A \ -S 4 \ -t 4 \ -T \ -c "Status Events" \ -F 'IBM 9729 Link Down \n$*'\ -D 'This trap is issued if the 9729 device has detected that its link is down or bad.' echo "Trap ibm9729LinkDownTrap has been added." ctr=$((( $ctr + 1 ))) echo "\n" ################### Power Supply 1 Up Trap ######################### /usr/OV/bin/addtrap -n "ibm9729" \ -l "ibm9729PowerSupply1UpTrap" \ -i '1.3.6.1.4.1.2.6.86' \ -g 6 \ -s 7 \ -o A \ -S 0 \ -t 0 \ -T \ -c "Status Events" \ -F 'IBM 9729 Power Supply 1 Up \n$*'\ -D 'This trap is issued when power supply 1 comes up after a failure.' echo "Trap ibm9729PowerSupply1UpTrap has been added." ctr=$((( $ctr + 1 ))) echo "\n" ################### Power Supply 2 Up Trap ######################### /usr/OV/bin/addtrap -n "ibm9729" \ -l "ibm9729PowerSupply2UpTrap" \ -i '1.3.6.1.4.1.2.6.86' \ -g 6 \ -s 8 \ -o A \ -S 0 \ -t 0 \ -T \ -c "Status Events" \ -F 'IBM 9729 Power Supply 2 Up \n$*'\ -D 'This trap is issued when power supply 2 comes up after a failure.' echo "Trap ibm9729PowerSupply2UpTrap has been added." ctr=$((( $ctr + 1 ))) echo "\n" ################### Grating Control System OK Trap ######################### /usr/OV/bin/addtrap -n "ibm9729" \ -l "ibm9729GratingControlSystemOKTrap" \ -i '1.3.6.1.4.1.2.6.86' \ -g 6 \ -s 9 \ -o A \ -S 0 \ -t 0 \ -T \ -c "Status Events" \ -F 'IBM 9729 Grating Control System OK \n$*'\ -D 'This trap is issued when the grating control system resumes normal operation.' echo "Trap ibm9729GratingControlSystemOKTrap has been added." ctr=$((( $ctr + 1 ))) echo "\n" ################### Cabinet Temperature Normal Trap ######################### /usr/OV/bin/addtrap -n "ibm9729" \ -l "ibm9729CabinetTemperatureNormalTrap" \ -i '1.3.6.1.4.1.2.6.86' \ -g 6 \ -s 10 \ -o A \ -S 0 \ -t 0 \ -T \ -c "Status Events" \ -F 'IBM 9729 Cabinet Temperature Normal \n$*'\ -D 'This trap is issued when the cabinet temperature inside the 9729 device comes back to within the permissible range.' echo "Trap ibm9729CabinetTemperatureNormalTrap has been added." ctr=$((( $ctr + 1 ))) echo "\n" ################### Unit Responding to Poll Trap ######################### /usr/OV/bin/addtrap -n "ibm9729" \ -l "ibm9729UnitRespondingtoPollTrap" \ -i '1.3.6.1.4.1.2.6.86' \ -g 6 \ -s 11 \ -o A \ -S 0 \ -t 0 \ -T \ -c "Status Events" \ -F 'IBM 9729 Unit Responding to Poll \n$*'\ -D 'This trap is issued when the 9729 device resumes responding to polls.' echo "Trap ibm9729UnitRespondingtoPollTrap has been added." ctr=$((( $ctr + 1 ))) echo "\n" ################### Card Uninstalled Trap ######################### /usr/OV/bin/addtrap -n "ibm9729" \ -l "ibm9729CardUninstalledTrap" \ -i '1.3.6.1.4.1.2.6.86' \ -g 6 \ -s 12 \ -o A \ -S 2 \ -t 0 \ -T \ -c "Status Events" \ -F 'IBM 9729 Card Uninstalled \n$*'\ -D 'This trap is issued when an LRC or IOC is unplugged from its slot.' echo "Trap ibm9729CardUninstalledTrap has been added." ctr=$((( $ctr + 1 ))) echo "\n" ################### Input Light Absent Trap ######################### /usr/OV/bin/addtrap -n "ibm9729" \ -l "ibm9729InputLightAbsentTrap" \ -i '1.3.6.1.4.1.2.6.86' \ -g 6 \ -s 13 \ -o A \ -S 2 \ -t 0 \ -T \ -c "Status Events" \ -F 'IBM 9729 Input Light Absent \n$*'\ -D 'This trap is issued when the input light to an IOC is absent.' echo "Trap ibm9729InputLightAbsentTrap has been added." ctr=$((( $ctr + 1 ))) echo "\n" ################### Link Light Not Detected Trap ######################### /usr/OV/bin/addtrap -n "ibm9729" \ -l "ibm9729LinkLightNotDetectedTrap" \ -i '1.3.6.1.4.1.2.6.86' \ -g 6 \ -s 14 \ -o A \ -S 2 \ -t 0 \ -T \ -c "Status Events" \ -F 'IBM 9729 Link Light Not Detected \n$*'\ -D 'This trap is issued if the LRC is not able to detect the fiber link light.' echo "Trap ibm9729LinkLightNotDetectedTrap has been added." ctr=$((( $ctr + 1 ))) echo "\n" ################### Laser Output Weak Trap ######################### /usr/OV/bin/addtrap -n "ibm9729" \ -l "ibm9729LaserOutputWeakTrap" \ -i '1.3.6.1.4.1.2.6.86' \ -g 6 \ -s 15 \ -o A \ -S 2 \ -t 0 \ -T \ -c "Status Events" \ -F 'IBM 9729 Laser Output Weak \n$*'\ -D 'This trap is issued when the LRCs laser output becomes weak.' echo "Trap ibm9729LaserOutputWeakTrap has been added." ctr=$((( $ctr + 1 ))) echo "\n" ################### Laser Drive Failed Trap ######################### /usr/OV/bin/addtrap -n "ibm9729" \ -l "ibm9729LaserDriveFailedTrap" \ -i '1.3.6.1.4.1.2.6.86' \ -g 6 \ -s 16 \ -o A \ -S 2 \ -t 0 \ -T \ -c "Status Events" \ -F 'IBM 9729 Laser Drive Failed \n$*'\ -D 'This trap is issued if the LRCs laser drive current is execessively high with insufficient laser output.' echo "Trap ibm9729LaserDriveFailedTrap has been added." ctr=$((( $ctr + 1 ))) echo "\n" ################### Card Installed Trap ######################### /usr/OV/bin/addtrap -n "ibm9729" \ -l "ibm9729CardInstalledTrap" \ -i '1.3.6.1.4.1.2.6.86' \ -g 6 \ -s 17 \ -o A \ -S 0 \ -t 0 \ -T \ -c "Status Events" \ -F 'IBM 9729 Card Installed \n$*'\ -D 'This trap is issued if an LRC and IOC are plugged back into their slots.' echo "Trap ibm9729CardInstalledTrap has been added." ctr=$((( $ctr + 1 ))) echo "\n" ################### Input Light Present Trap ######################### /usr/OV/bin/addtrap -n "ibm9729" \ -l "ibm9729InputLightPresentTrap" \ -i '1.3.6.1.4.1.2.6.86' \ -g 6 \ -s 18 \ -o A \ -S 0 \ -t 0 \ -T \ -c "Status Events" \ -F 'IBM 9729 Input Light Present \n$*'\ -D 'This trap is issued if the IOC detects input light coming from a remote host connected to it.' echo "Trap ibm9729InputLightPresentTrap has been added." ctr=$((( $ctr + 1 ))) echo "\n" ################### Link Light Detected Trap ######################### /usr/OV/bin/addtrap -n "ibm9729" \ -l "ibm9729LinkLightDetectedTrap" \ -i '1.3.6.1.4.1.2.6.86' \ -g 6 \ -s 19 \ -o A \ -S 0 \ -t 0 \ -T \ -c "Status Events" \ -F 'IBM 9729 Link Light Detected \n$*'\ -D 'This trap is issued if the LRC detects the presence of link light on the fiber.' echo "Trap ibm9729LinkLightDetectedTrap has been added." ctr=$((( $ctr + 1 ))) echo "\n" ################### Laser Output Normal Trap ######################### /usr/OV/bin/addtrap -n "ibm9729" \ -l "ibm9729LaserOutputNormalTrap" \ -i '1.3.6.1.4.1.2.6.86' \ -g 6 \ -s 20 \ -o A \ -S 0 \ -t 0 \ -T \ -c "Status Events" \ -F 'IBM 9729 Laser Output Normal \n$*'\ -D 'This trap is issued if the LRCs laser output is back to normal.' echo "Trap ibm9729LaserOutputNormalTrap has been added." ctr=$((( $ctr + 1 ))) echo "\n" ################### Laser Drive OK Trap ######################### /usr/OV/bin/addtrap -n "ibm9729" \ -l "ibm9729LaserDriveOKTrap" \ -i '1.3.6.1.4.1.2.6.86' \ -g 6 \ -s 21 \ -o A \ -S 0 \ -t 0 \ -T \ -c "Status Events" \ -F 'IBM 9729 Laser Drive OK \n$*'\ -D 'This trap is issued if the LRCs drive current is back to normal.' echo "Trap ibm9729LaserDriveOKTrap has been added." ctr=$((( $ctr + 1 ))) echo "\n" ################### Link Up Trap ######################### /usr/OV/bin/addtrap -n "ibm9729" \ -l "ibm9729LinkUpTrap" \ -i '1.3.6.1.4.1.2.6.86' \ -g 6 \ -s 22 \ -o A \ -S 0 \ -t 0 \ -T \ -c "Status Events" \ -F 'IBM 9729 Link Up \n$*'\ -D 'This trap is issued if the 9729 device detects that its fiber link is up once more.' echo "Trap ibm9729LinkUpTrap has been added." ctr=$((( $ctr + 1 ))) echo "\n" ################### Switched To Primary Fiber Trap ######################### /usr/OV/bin/addtrap -n "ibm9729" \ -l "ibm9729SwitchedToPrimaryFiberTrap" \ -i '1.3.6.1.4.1.2.6.86' \ -g 6 \ -s 23 \ -o A \ -S 2 \ -t 0 \ -T \ -c "Status Events" \ -F 'IBM 9729 Switched To Primary Fiber \n$*'\ -D 'This trap is issued if the 9729 device switches the optical signal from its secondary fiber back onto its primary fiber.' echo "Trap ibm9729SwitchedToPrimaryFiberTrap has been added." ctr=$((( $ctr + 1 ))) echo "\n" ################### Switched To Secondary Fiber Trap ######################### /usr/OV/bin/addtrap -n "ibm9729" \ -l "ibm9729SwitchedToSecondaryFiberTrap" \ -i '1.3.6.1.4.1.2.6.86' \ -g 6 \ -s 24 \ -o A \ -S 2 \ -t 0 \ -T \ -c "Status Events" \ -F 'IBM 9729 Switched To Secondary Fiber \n$*'\ -D 'This trap is issued if the 9729 device switches the optical signal from its primary fiber back onto its secondary fiber.' echo "Trap ibm9729SwitchedToSecondaryFiberTrap has been added." event -e FMTCHG